<template>
  <div>
    <a-modal
      :title="modalOptions.title"
      :style="modalOptions.styleObj"
      :visible="modalOptions.modalVisibile"
      :maskClosable="false"
      @ok="handleOk"
      @cancel="handleCancel"
    >
      <slot name="modalCon">
      </slot>
    </a-modal>
  </div>
</template>
<script>
export default {
  name: 'Modal',
  data () {
    return {
      title: '提示'
    }
  },
  props: {
    modalOptions: {
      type: Object,
      default: () => {
        return {
          maskClosable: false
        }
      }
    }
  },
  methods: {
    handleOk () {
      this.$emit('handleOk')
    },
    handleCancel () {
      this.modalOptions.modalVisibile = false
      // this.$emit('handleCancel')
    },
    setModal1Visible (modal1Visible) {
      this.modal1Visible = modal1Visible
    }
  }
}
</script>
<style lang="scss" scoped>

</style>
